﻿@model IEnumerable<ETA.Entity.WebMessage>

@{
    ViewBag.Title = "消息中心";
}
<h2><strong></strong></h2>
<p class="rAdminStep">消息中心</p>

<div>
    <table class="table table-hover" id="tbMessage">
        <thead>
            <tr>
                <th>序号</th>
                <th>消息类别</th>
                <th>消息正文</th>
                <th>消息发送方面</th>
                <th>发送时间</th>
                <th>阅读状态</th>
                <th>阅读时间</th>
            </tr>
        </thead>
        <tbody>
            @{
                var index = 1;
                foreach (var m in Model)
                {
                <tr>
                    <td>@(index++)</td>
                    <td>@m.MessageTypeEnum</td>
                    <td>@m.Content</td>
                    <td>出国直通车</td>
                    <td>@m.CreateDate</td>
                    @if (m.MessageOpenEnum == ETA.DomainEnum.MessageOpenEnum.未读)
                    {
                        <td>@*<span>@m.MessageOpenEnum</span>*@
                            <button type="button" class="btn btn-link aReaded" data-msgId="@m.WebMessageId"><span class="glyphicon glyphicon-envelope"></span></button>
                        </td>
                    }
                    else
                    {
                        <td>@m.MessageOpenEnum</td>
                    }
                    <td>@m.ModifyDate</td>
                </tr>
                }
            }
        </tbody>
    </table>
    <p style="text-align: center">@Html.ActionLink("返回上页", "Index", "I", new { @class = "btn btn-default" })</p>

    <div id="pp" class="pagination"></div>
</div>

@section scripts
{
    @Scripts.Render("~/Bundles/message")
}